#pragma once

#include "include_gl.h"
#include "GLShader.h"
#include <vector>
#include <string>

class GLProgram
{
public:
	GLProgram(std::string userName="Unnamed");
	~GLProgram();

	void attach(GLShader* shader);
	void attach(GLenum shaderType, const std::string& file);

	bool link();

	void use();

	GLint getUniformLocation(const char* uniformName);

	GLuint name;
	std::string userName;

private:
	std::vector<GLShader*> _ownedShaders;
	std::vector<GLShader*> _referencedShaders;
};